// import com->alibaba->druid->sql->ast->*;
// import com->alibaba->druid->sql->visitor->SQLASTVisitor;

// import java->util->ArrayList;
// import java->util->std::list;

#pragma once

#include <string>
#include <list>

#include "../SQLReplaceable.h"
#include "../SQLName.h"
#include "../SQLStatement.h"
#include "../SQLExpr.h"
#include "../SQLObjectImpl.h"

#include "SQLSelect.h"
#include "SQLTableSource.h"
#include "SQLTableSourceImpl.h"
#include "SQLWithSubqueryClause_Entry.h"

class SQLASTVisitor;

class SQLWithSubqueryClause : virtual public SQLObjectImpl
{
public:
  BOOL_ptr recursive;
  std::shared_ptr<std::list<std::shared_ptr<SQLWithSubqueryClause_Entry>>> entries;

  SQLWithSubqueryClause();
  SHAREDOBJECT(SQLWithSubqueryClause);
  virtual SQLObject_ptr clone();
  std::shared_ptr<std::list<std::shared_ptr<SQLWithSubqueryClause_Entry>>> getEntries();

  void addEntry(std::shared_ptr<SQLWithSubqueryClause_Entry> entry);

  BOOL_ptr getRecursive();

  void setRecursive(BOOL_ptr recursive);

  virtual void accept0(SQLASTVisitor_ptr visitor) override;

  std::shared_ptr<SQLWithSubqueryClause_Entry> findEntry(long alias_hash);

  bool equals(Object_ptr o);

  int hashCode();

  bool containsAttribute(string_ptr name){};
  void addBeforeComment(string_list_ptr comments){};
  void addBeforeComment(wstring_list_ptr comments){};
  string_list_ptr getAfterCommentsDirect(){};
  string_list_ptr getBeforeCommentsDirect(){};
  void addAfterComment(string_ptr comment){};
  void addAfterComment(string_list_ptr comments){};
  bool hasBeforeComment(){};
  bool hasAfterComment(){};
};
